package com.shuzhi.dataway.udf;

import com.shuzhi.dataway.dao.User;
import net.hasor.dataql.DimUdf;
import net.hasor.dataql.Hints;
import net.hasor.dataql.Udf;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Siyuan.mlq
 * @version 1.0
 * @description 示例udf
 * @since 2020/4/21
 */
@DimUdf("getUserList")
public class DemoUdf implements Udf {

  @Override
  public Object call(Hints hints, Object... objects) throws Throwable {
    List<User> userList = new ArrayList<>();
    userList.add(new User(1, 20, "admin"));
    userList.add(new User(2, 15, "tester"));
    userList.add(new User(3, 28, "developer"));
    return userList;
  }
}
